package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.system.domain.ConsumeLog;
import com.ruoyi.system.mapper.ConsumeLogMapper;
import com.ruoyi.system.service.IConsumeLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.support.Convert;

/**
 * 消费记录 服务层实现
 * 
 * @author ruoyi
 * @date 2019-01-06
 */
@Service
public class ConsumeLogServiceImpl implements IConsumeLogService
{
	@Autowired
	private ConsumeLogMapper consumeLogMapper;

	/**
     * 查询消费记录信息
     * 
     * @param id 消费记录ID
     * @return 消费记录信息
     */
    @Override
	public ConsumeLog selectConsumeLogById(Integer id)
	{
	    return consumeLogMapper.selectConsumeLogById(id);
	}
	
	/**
     * 查询消费记录列表
     * 
     * @param map 消费记录信息
     * @return 消费记录集合
     */
	@Override
	public List<ConsumeLog> selectConsumeLogList(Map<String,Object> map)
	{
	    return consumeLogMapper.selectConsumeLogList(map);
	}
	
    /**
     * 新增消费记录
     * 
     * @param consumeLog 消费记录信息
     * @return 结果
     */
	@Override
	public int insertConsumeLog(ConsumeLog consumeLog)
	{
	    return consumeLogMapper.insertConsumeLog(consumeLog);
	}
	
	/**
     * 修改消费记录
     * 
     * @param consumeLog 消费记录信息
     * @return 结果
     */
	@Override
	public int updateConsumeLog(ConsumeLog consumeLog)
	{
	    return consumeLogMapper.updateConsumeLog(consumeLog);
	}

	/**
     * 删除消费记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteConsumeLogByIds(String ids)
	{
		return consumeLogMapper.deleteConsumeLogByIds(Convert.toStrArray(ids));
	}
	
}
